<template>
	<view class="container">
		<view class="" style="margin: 30rpx;color: #9c9c9c;display: flex; align-items: center;justify-content: space-around;">
			<text>患者姓名：{{title.xm}}</text> 
			<text>性别：{{title.xb}}</text>
			<text>年龄：{{title.nl}}</text>
		</view>
		<view v-for="(item,index) in list2">
			<uni-card :title="'处置医生：'+item.username" :sub-title="'体温：'+item.tw" :extra="'血压：'+item.xy" :thumbnail="avatar" @click="onClick">
				<text class="uni-body">
					脉搏：{{item.mb}}
					\n神智：{{item.sz}}
					\n性质：{{item.xz}}
					\n血压：{{item.xy}}
					\n输入量：{{item.srl}}
					\n输出量：{{item.scl}}
					\n备注：{{item.bz}}
				</text>
			</uni-card>
		</view>
	</view>
</template>

<script>
	import { nursingById } from '../../api/huanzhe.js'
import { log } from '../../common/util.js';
	export default {
		data() {
			return {
				active: -1,
				list2: [],
				title:{
					xm:null,
					xb:null,
					nl:null
				}
			};
		},
		onLoad(option){
			var query=JSON.parse(option.data)
			this.title.xm=query.xm
			this.title.xb=query.xb
			this.title.nl=query.nl
			this.nursingByIds(query.hzId)
		},
		methods:{
			// 根据患者id查询
			nursingByIds(hzId){
				nursingById(hzId).then(res=>{
					log(res.rows)
					this.list2=res.rows
				})
			}
		}
	}
</script>

<style lang="scss">

</style>